package com.proyecto.core.Utilidades;

import java.io.IOException;
import java.io.OutputStream;

import nextapp.echo2.app.filetransfer.DownloadProvider;

public class DownLoadProvider implements DownloadProvider{

	FileWrapper file = null;
	
	
    public DownLoadProvider(FileWrapper file) {
		super();
		this.file = file;
	}

	public String getContentType() {
        return file.getType();
    }

    public String getFileName() {
        return file.getName();
    }

    public int getSize() { 
    	return (int) file.getSize();
    }

    public void writeFile(OutputStream stream)
            throws IOException {
        stream.write(file.getContent());
    }

}
